﻿
using System.Data.Entity.ModelConfiguration;
using ProjetoComperio.DataLayer.Entities;

namespace ProjetoComperio.DataLayer.Configuration
{
    public class SubjectConfiguration : EntityConfiguration<Subject>
    {
        public SubjectConfiguration()
        {
            Property(subject => subject.SubjectID).IsIdentity();
            MapSingleType(
                subject => new
                {
                    subject.ContributionID,
                    subject.CreatedDate,
                    subject.Message,
                    subject.SubjectID,
                    subject.Title,
                    subject.UserName
                }).ToTable("Subject");
        }
    }
}
